package com.qiyu.tech.mybatis.log.starter;

import com.qiyu.datasource.annotation.AppDataSource;
import com.qiyu.datasource.enums.DatasourceConfigEnum;
import com.qiyu.datasource.interceptor.QiyuInterceptor;
import com.qiyu.tech.mybatis.log.starter.mybatis.plugins.SqlCountInterceptor;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.Import;

/**
 * @Author linhao
 * @Date created in 3:56 下午 2021/2/22
 */
@SpringBootApplication(scanBasePackages = "com.qiyu.*")
@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})
@AppDataSource(datasourceType = {DatasourceConfigEnum.CLOUD_DB},defaultType = DatasourceConfigEnum.CLOUD_DB)
@Import(SqlCountInterceptor.class)
public class Application {

    public static void main(String[] args) {
        SpringApplication.run(Application.class);
    }
}
